<template>
  <div style="margin-top: 20px">
    <el-row>
      <el-input v-model="input" placeholder="姓名/档案号" style="width: 300px"></el-input>&nbsp;
      <el-button
        icon="el-icon-search"
        type="primary"
        @click="search(input)"
      ></el-button>
      <el-button @click="addmember" type="warning" icon="el-icon-circle-plus-outline">新增</el-button>
    </el-row>
    <br/>
    <div>
      <el-table
        v-loading="loading"
        :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
        border
      >
        <el-table-column
          fixed
          prop="fileNumber"
          label="档案号"
          width="150"
        >
        </el-table-column>
        <el-table-column
          prop="name"
          label="姓名"
          width="120"
        >
        </el-table-column>
        <el-table-column
          prop="sex"
          label="性别"
          width="120"
        >
        </el-table-column>
        <el-table-column
          prop="age"
          label="年龄"
          width="120"
        >
        </el-table-column>
        <el-table-column
          prop="username"
          label="健康管理师"
          width="300"
        >
        </el-table-column>
        <el-table-column
          prop="phoneNumber"
          label="手机号码"
          width="120"
        >
        </el-table-column>
        <el-table-column
          prop="regTime"
          label="注册时间"
          width="120"
        >
        </el-table-column>
        <el-table-column
          fixed="right"
          label="操作"
          width="300"
        >
          <template v-slot="scope">
            <el-button @click="openAsync(scope.row.id)" type="warning" size="small" icon="el-icon-edit">编辑</el-button>
            <el-button @click="open(scope.row.id)" type="danger" size="small" icon="el-icon-delete">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[5, 10, 15, 20]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="tableData.length"
      >
      </el-pagination>
    </div>
    <div>
      <el-dialog title="添加" :before-close="openUAdd" :visible.sync="dialogFormVisible">
        <el-form :inline="true" :model="form" class="demo-form-inline" style="flex: 1;">
          <el-form-item label="档案号" style="width: 45%;" class="custom-margin">
            <el-input v-model="addForm.fileNumber" placeholder="档案号" style="margin-left: 20px;"
                      class="custom-input "
            ></el-input>
          </el-form-item>
          <el-form-item label="身份证" prop="password" style="width: 45%;" class="custom-margin">
            <el-input v-model="addForm.idCard" style="margin-left: 25px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="登录密码" prop="email" style="width: 45%;" class="custom-margin">
            <el-input v-model="addForm.password" style="margin-left: 5px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="手机号" prop="mobile" style="width: 45%;">
            <el-input v-model="addForm.phoneNumber" style="margin-left: 25px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="姓名" prop="name" style="width: 45%;">
            <el-input v-model="addForm.name" class="custom-input" style="margin-left: 33px;"></el-input>
          </el-form-item>
          <el-form-item label="性别" prop="gender" style="width: 45%;">
            <el-select v-model="addForm.sex" style="margin-left: 40px;" class="custom-input" filterable>
              <el-option value="男">男</el-option>
              <el-option value="女">女</el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="民族" prop="ethnicity" style="width: 45%;">
            <el-input v-model="addForm.nation" class="custom-input" style="margin-left: 33px;"></el-input>
          </el-form-item>
          <el-form-item label="年龄" prop="age" style="width: 45%;">
            <el-input v-model="addForm.age" style="margin-left: 40px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="出生日期" prop="birthdate" style="width: 45%;">
            <el-date-picker
                v-model="addForm.birthday"
                type="date"
                placeholder="选择日期"
                style="margin-left: 5px; width: 200px;">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="邮箱" prop="email" style="width: 45%;">
            <el-input v-model="addForm.email" style="margin-left: 40px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="婚姻状态" prop="maritalStatus" style="width: 45%;">
            <el-select v-model="addForm.marriageStatus" style="margin-left: 6px;" class="custom-input" filterable>
              <el-option value="已婚">已婚</el-option>
              <el-option value="未婚">未婚</el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="职业" prop="occupation" style="width: 45%;">
            <el-input v-model="addForm.career" style="margin-left: 40px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="文化程度" prop="education" style="width: 45%;">
            <el-input v-model="addForm.educationLevel" style="margin-left: 6px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="籍贯" prop="hometown" style="width: 45%;">
            <el-input v-model="addForm.nativePlace" style="margin-left: 37px;" class="custom-input "></el-input>
          </el-form-item>
          <el-form-item label="健康师" prop="healthManager" style="width: 45%;">
            <el-select v-model="addForm.roleId" style="margin-left: 18px;" class="custom-input" filterable>
              <el-option v-for="(option1, index) in option1" :key="index" :label="option1.label"
                         :value="option1.value" :disabled="option1.disabled" :class="{ 'disabled-option':
                             option1.disabled }"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="档案状态" prop="fileStatus" style="width: 45%;">
            <el-select v-model="addForm.fileStatus" placeholder="请选择活动区域" style="margin-left: 8px;"
                       class="custom-input "
            >
              <el-option label="启动 " value="0"></el-option>
              <el-option label="禁用" value="1"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="备注" prop="desc">
            <el-input type="textarea" v-model="addForm.remark" style="width: 550px;
  height: 40px;"
            ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="openUAdd()">取 消</el-button>
          <el-button type="primary" @click="openOk('添加成功');dialogFormVisible = false">确 定</el-button>
        </div>
      </el-dialog>
    </div>
    <div>
      <el-dialog title="编 辑" :before-close="opensaves" :visible.sync="opensave">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="基本信息" name="first">
            <el-form :inline="true" :model="form" class="demo-form-inline" style="flex: 1;">
              <el-form-item label="档案号" style="width: 45%;" class="custom-margin">
                <el-input v-model="updatefrom.phoneNumber" placeholder="档案号" style="margin-left: 20px;"
                          class="custom-input "
                ></el-input>
              </el-form-item>
              <el-form-item label="身份证" prop="password" style="width: 45%;" class="custom-margin">
                <el-input v-model="updatefrom.idCard" style="margin-left: 25px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="登录密码" prop="email" style="width: 45%;" class="custom-margin">
                <el-input v-model="updatefrom.password" style="margin-left: 5px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="手机号" prop="mobile" style="width: 45%;">
                <el-input v-model="updatefrom.phoneNumber" style="margin-left: 25px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="姓名" prop="name" style="width: 45%;">
                <el-input v-model="updatefrom.name" class="custom-input" style="margin-left: 33px;"></el-input>
              </el-form-item>
              <el-form-item label="性别" prop="gender" style="width: 45%;">
                <el-input v-model="updatefrom.sex" style="margin-left: 40px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="民族" prop="ethnicity" style="width: 45%;">
                <el-input v-model="updatefrom.nation" class="custom-input" style="margin-left: 33px;"></el-input>
              </el-form-item>
              <el-form-item label="年龄" prop="age" style="width: 45%;">
                <el-input v-model="updatefrom.age" style="margin-left: 40px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="出生日期" prop="birthdate" style="width: 45%;">
                <el-input v-model="updatefrom.birthday" style="margin-left: 5px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="邮箱" prop="email" style="width: 45%;">
                <el-input v-model="updatefrom.email" style="margin-left: 40px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="婚姻状态" prop="maritalStatus" style="width: 45%;">
                <el-select v-model="updatefrom.marriageStatus" style="margin-left: 8px;" class="custom-input" filterable>
                <el-option value="已婚">已婚</el-option>
                <el-option value="未婚">未婚</el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="职业" prop="occupation" style="width: 45%;">
                <el-input v-model="updatefrom.career" style="margin-left: 40px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="文化程度" prop="education" style="width: 45%;">
                <el-input v-model="updatefrom.educationLevel" style="margin-left: 5px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="籍贯" prop="hometown" style="width: 45%;">
                <el-input v-model="updatefrom.nativePlace" style="margin-left: 37px;" class="custom-input "></el-input>
              </el-form-item>
              <el-form-item label="健康师" prop="healthManager" style="width: 45%;">
                <el-select v-model="updatefrom.username" style="margin-left: 8px;" class="custom-input" filterable>
                  <el-option v-for="(option1, index) in option1" :key="index" :label="option1.label"
                             :value="option1.value" :disabled="option1.disabled" :class="{ 'disabled-option':
                             option1.disabled }"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="档案状态" prop="fileStatus" style="width: 45%;">
                <el-select v-model="updatefrom.fileStatus" style="margin-left: 8px;" class="custom-input" filterable>
                  <el-option v-for="(option, index) in options" :key="index" :label="option.label" :value="option.value" :disabled="option.disabled" :class="{ 'disabled-option': option.disabled }"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="备注" prop="desc">
                <el-input type="textarea" v-model="updatefrom.remark" style="width: 550px;
  height: 40px;"
                ></el-input>
              </el-form-item>
            </el-form>
          </el-tab-pane>
          <el-tab-pane label="动态信息" name="second">
            <el-form :inline="true" :model="form" class="demo-form-inline" style="flex: 1;">
              <el-form-item label="身高" prop="hometown" style="width: 20%;">
                <el-input style="margin-left: 5px;  width: 70px; height: 10px;" v-model="updatefrom1.height"></el-input>
              </el-form-item>
              <el-form-item label="体重" prop="hometown" style="width: 24%;">
                <el-input style="margin-left: 5px;  width: 70px; height: 10px;" v-model="updatefrom1.weight"></el-input>
              </el-form-item>
              <el-form-item label="舒张压">
                <el-input style="margin-left: 5px;  width: 70px; height: 10px;" v-model="updatefrom1.diastolic_pressure"></el-input>
              </el-form-item>
              <el-form-item label="收缩压">
                <el-input style="margin-left: 5px;  width: 70px; height: 10px;" v-model="updatefrom1.systolic_pressure"></el-input>
              </el-form-item>
              <el-form-item label="呼吸" prop="hometown" style="width: 45%;">
                <el-input style="margin-left: 37px;" class="custom-input "
                          v-model="updatefrom1.breathe"></el-input>
              </el-form-item>
              <el-form-item label="体温" prop="hometown" style="width: 45%;">
                <el-input style="margin-left: 37px;" class="custom-input "
                          v-model="updatefrom1.temperature"></el-input>
              </el-form-item>
              <el-form-item label="腰围" prop="hometown" style="width: 45%;">
                <el-input style="margin-left: 37px;" class="custom-input " v-model="updatefrom1.the_waist"></el-input>
              </el-form-item>
              <el-form-item label="臀围" prop="hometown" style="width: 45%;">
                <el-input style="margin-left: 37px;" class="custom-input " v-model="updatefrom1.arm_Circumference"></el-input>
              </el-form-item>
              <el-form-item label="BMI" prop="hometown" style="width: 45%;">
                <el-input style="margin-left: 37px;" class="custom-input " v-model="updatefrom1.t_BML"></el-input>
              </el-form-item>
              <el-form-item label="血氧饱和度" prop="hometown" style="width: 45%;">
                <el-progress :percentage="percentage" :color="customColor" style="width: 200px"></el-progress>
                <el-button-group>
                  <el-button icon="el-icon-minus" @click="decrease"></el-button>
                  <el-button icon="el-icon-plus" @click="increase"></el-button>
                </el-button-group>
              </el-form-item>
            </el-form>
          </el-tab-pane>
          <el-tab-pane label="病史" name="third">
            <el-form ref="ruleForm" label-width="100px" class="demo-ruleForm">
              <el-form-item label="既往史" prop="desc">
                <el-input type="textarea" style="width: 550px;
  height: 40px;"  v-model="updatefrom2.past_History"
                ></el-input>
              </el-form-item>
              <el-form-item label="家族史" prop="desc">
                <el-input type="textarea" style="width: 550px;
  height: 40px;" v-model="updatefrom2.family_History"
                ></el-input>
              </el-form-item>
              <el-form-item label="过敏史" prop="desc">
                <el-input type="textarea" style="width: 550px;
  height: 40px;" v-model="updatefrom2.allergy_History"
                ></el-input>
              </el-form-item>
              <el-form-item label="病史" prop="desc">
                <el-input type="textarea" style="width: 550px;
  height: 40px;" v-model="updatefrom2.medical_History"
                ></el-input>
              </el-form-item>
              <el-form-item label="慢性病" prop="desc">
                <el-input type="textarea" style="width: 550px;
  height: 40px;" v-model="updatefrom2.chronic_Disease"
                ></el-input>
              </el-form-item>
            </el-form>
          </el-tab-pane>
        </el-tabs>
        <div slot="footer" class="dialog-footer">
          <el-button @click="opensaves()">取 消</el-button>
          <el-button type="primary" @click="openOk('保存成功');opensave = false">保 存</el-button>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>

import axios from 'axios'
import getters from '@/store/getters';

export default {
  beforeCreate() {
  //  console.log('beforeCreate: 页面加载前执行方法')
    axios.get('api/member/findAll').then(res => {
  //    console.log(res)
      this.tableData1 = res.data.data
      this.tableData = res.data.data
   //   console.log(this.tableData.length)
    })
  },
  mounted() {
    this.totalNum = this.tableData.length
  },
  methods: {
    customColorMethod(percentage) {
      if (percentage < 30) {
        return '#909399'
      } else if (percentage < 70) {
        return '#e6a23c'
      } else {
        return '#67c23a'
      }
    },
    increase() {
      this.percentage += 10
      if (this.percentage > 100) {
        this.percentage = 100
      }
    },
    decrease() {
      this.percentage -= 10
      if (this.percentage < 0) {
        this.percentage = 0
      }
    },
    addmember() {
      this.option1=[];
      let bianliang;
      console.log(getters)
      const permissions = getters.permissions(this.$store.state);
      console.log(permissions)
      permissions.forEach(permission => {
        const keyword = permission.keyword;
       // console.log(keyword)
        if(keyword === "addmember") {
          bianliang=1;
        }
      });
      if(bianliang===1) {
        axios.get("api/member/user").then((res) => {
          console.log(res);
          res.data.data.forEach((item) => {   // 使用 forEach() 遍历数组
            console.log(item.user_id, item.account);
            this.option1.push({"label":item.account,"value":item.user_id})
          })
        })
        this.dialogFormVisible=true;
      }else{
        alert("抱歉,您没有这个权限")
      }
    },
    search(bool) {

      this.currentPage = 1
      if (bool) {
        this.tableData = this.tableData1
        // 前端实现模糊查询--不用对接口
        let newListData = [] // 用于存放搜索出来数据的新数组
        if (this.input) {
          this.tableData.filter((item) => {
            if (item.name.indexOf(this.input) !== -1) {
              newListData.push(item)
            }
            if (item.fileNumber === (this.input)) {
              newListData.push(item)
            }
          })
        }
        this.tableData = newListData
      } else {
        axios.get('api/member/findAll').then(res => {
          //console.log(res)
          this.tableData = res.data.data
       //   console.log(this.tableData.length)
        })
      }
    },
    handleClick(row) {
      //console.log(row)
    },
    handleSizeChange(val) {
      this.pageSize = val
   //   console.log(`每页 ${val} 条`)
    },
    handleCurrentChange(val) {
      this.currentPage = val
     // console.log(`当前页: ${val}`)
    },
    handleSizeChanges(val) {
      this.pageSizes = val
    //  console.log(`每页 ${val} 条`)
    },
    handleCurrentChanges(val) {
      this.currentPages = val
     // console.log(`当前页: ${val}`)
    },
    //编辑查询
    openAsync(id) {
      this.option1=[];
      let bianliang;
      const permissions = getters.permissions(this.$store.state);
      permissions.forEach(permission => {
        const keyword = permission.keyword;
     //   console.log(keyword)
        if(keyword === "updatemember") {
          bianliang=1;
        }
      });
      if(bianliang===1) {
        axios.get("api/member/user").then((res) => {
          console.log(res);
          res.data.data.forEach((item) => {   // 使用 forEach() 遍历数组
            console.log(item.user_id, item.account);
            this.option1.push({"label":item.account,"value":item.user_id})
          })
        })
        axios.post('api/member/findOne', { id: id }).then((res) => {
          // console.log(res)
          let data = res.data.data
          this.updatefrom.id=data.id
          this.updatefrom.name = data.name
          this.updatefrom.fileNumber = data.fileNumber
          this.updatefrom.idCard = data.idCard
          this.updatefrom.phoneNumber = data.phoneNumber
          this.updatefrom.regTime = data.regTime
          this.updatefrom.password = data.password
          this.updatefrom.email = data.email
          this.updatefrom.sex = data.sex
          this.updatefrom.birthday = data.birthday
          this.updatefrom.remark = data.remark
          this.updatefrom.marriageStatus=data.marriageStatus
          this.updatefrom.username = data.username
          this.updatefrom.nation = data.nation
          this.updatefrom.career = data.career
          this.updatefrom.nativePlace = data.nativePlace
          this.updatefrom.educationLevel = data.educationLevel
          this.updatefrom.age=data.age
          if(data.filesStatac==0){
            this.updatefrom.fileStatus="正常"
          }else{
            this.updatefrom.fileStatus="禁用"
          }
          // this.updatefrom.fileStatus = data.filesStatac
        })
        //DOTO
        axios.post('api/member/findOne1', { id: id }).then((res) => {
          console.log(res)
          this.updatefrom1.information_id=res.data.data.information_id
          this.updatefrom1.arm_Circumference=res.data.data.arm_Circumference
          this.updatefrom1.bloodOxygenSaturation=res.data.data.bloodOxygenSaturation
          this.updatefrom1.breathe=res.data.data.breathe
          this.updatefrom1.diastolic_pressure=res.data.data.diastolic_pressure
          this.updatefrom1.height=res.data.data.height
          this.updatefrom1.weight=res.data.data.weight
          this.updatefrom1.systolic_pressure=res.data.data.systolic_pressure
          this.updatefrom1.t_BML=res.data.data.t_BML
          this.updatefrom1.temperature=res.data.data.temperature
          this.updatefrom1.temperatureId=res.data.data.temperatureId
          this.updatefrom1.the_waist=res.data.data.the_waist
          this.percentage=res.data.data.bloodOxygenSaturation
        })
        axios.post('api/member/findOne2', { id: id }).then((res) => {
          console.log(res)
          this.updatefrom2.allergy_History=res.data.data.allergy_History
          this.updatefrom2.chronic_Disease=res.data.data.chronic_Disease
          this.updatefrom2.family_History=res.data.data.family_History
          this.updatefrom2.historyId=res.data.data.historyId
          this.updatefrom2.medical_History=res.data.data.medical_History
          this.updatefrom2.past_History=res.data.data.past_History
        })
        this.opensave = true
      }else{
        alert("抱歉,您没有这个权限")
      }

    },
    open(id) {
      let bianliang;
      const permissions = getters.permissions(this.$store.state);
      permissions.forEach(permission => {
        const keyword = permission.keyword;
     //   console.log(keyword)
        if(keyword === "deletemember") {
          bianliang=1;
        }
      });
      if(bianliang===1) {
        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          axios.post('api/member/Delmember', { id: id }).then((res) => {
            if (res.data.code === '200') {
              this.$message({
                type: 'success',
                message: '删除成功!'
              })
              axios.get('api/member/findAll').then(res => {
              //  console.log(res)
                this.tableData = res.data.data
              //  console.log(this.tableData.length)
              })
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      }else{
        alert("抱歉,您没有这个权限")
      }
    },
    Updates(id) {
      this.UpdateData = true
      let data = this.tableData.find((da) => da.name === id)
      this.updatefrom.name = data.name
    },
    openUpdate() {
      this.$confirm('是否退出修改?', '确认信息', {
        distinguishCancelAndClose: true,
        confirmButtonText: '取消',
        cancelButtonText: '退出'
      })
        .then(() => {
          this.$message({
            type: 'info',
            message: '放弃退出,继续修改'
          })
        })
        .catch(action => {
          this.$message({
            type: 'info',
            message: action === 'cancel'
              ? '放弃修改并离开页面'
              : '停留在当前页面'
          })
          if (action !== 'close') {
            this.UpdateData = false
          }
        })
    },
    openUAdd() {
      this.$confirm('是否退出添加?', '确认信息', {
        distinguishCancelAndClose: true,
        confirmButtonText: '取消',
        cancelButtonText: '退出'
      })
        .then(() => {
          this.$message({
            type: 'info',
            message: '放弃退出,继续添加'
          })
        })
        .catch(action => {
          this.$message({
            type: 'info',
            message: action === 'cancel'
              ? '放弃添加并离开页面'
              : '停留在当前页面'
          })
          if (action !== 'close') {
            this.dialogFormVisible = false
          }
        })
    },
    opensaves() {
      this.$confirm('是否退出保存?', '确认信息', {
        distinguishCancelAndClose: true,
        confirmButtonText: '取消',
        cancelButtonText: '退出'
      })
        .then(() => {
          this.$message({
            type: 'info',
            message: '放弃退出'
          })
        })
        .catch(action => {
          this.$message({
            type: 'info',
            message: action === 'cancel'
              ? '放弃保存并离开页面'
              : '停留在当前页面'
          })
          if (action !== 'close') {
            this.opensave = false
          }
        })
    },
    openOk(val) {
      if (val === '添加成功') {
        axios.post('api/member/addmember', this.addForm).then((res) => {
          //console.log(res.data.code)
          if (res.data.code === '200') {
            this.$message({
              message: val,
              type: 'success'
            })
            axios.get('api/member/findAll').then(res => {
             // console.log(res)
              this.tableData = res.data.data
          //    console.log(this.tableData.length)
            })
          }
        })
      }
      if(val==='保存成功'){
      //  console.log(this.updatefrom)
      //  console.log(this.updatefrom1)
      //  console.log(this.updatefrom2)
        axios.post('api/member/updatemember', {
          dto: this.updatefrom,
          info: this.updatefrom1,
          history: this.updatefrom2
        }).then((res) => {
          if (res.data.code === '200') {
            this.$message({
              message: val,
              type: 'success'
            })
            axios.get('api/member/findAll').then(res => {
          //    console.log(res)
              this.tableData = res.data.data
         //     console.log(this.tableData.length)
            })
          }
        });
      }
    }
  },
  data() {
    return {
      percentage: 20,
      customColor: '#409eff',
      customColors: [
        {color: '#f56c6c', percentage: 20},
        {color: '#e6a23c', percentage: 40},
        {color: '#5cb87a', percentage: 60},
        {color: '#1989fa', percentage: 80},
        {color: '#6f7ad3', percentage: 100}
      ],
      checkList: [],
      option1:[],
      options: [  { label: '正常', value: '1' }, { label: '禁用', value: '0' }],
      activeName: 'first',
      updatefrom: {
        id:"",//id
        fileNumber: '',// 档案编号
        name: '',// 姓名
        sex: '', //性别
        idCard: '',// 身份证号码
        phoneNumber: '',// 手机号码
        regTime: '', //注册时间（日期类型）
        password: '',// 密码
        email: '', //电子邮箱
        birthday: '',// 生日（日期类型）
        remark: '',// 备注
        marriageStatus: '',// 婚姻状况
        nation: '',// 民族
        career: '',//职业
        nativePlace: '',// 籍贯
        educationLevel: '',//" 教育程度
        username:'',//管理师
        age:"",//年龄
        roleId: '',//角色ID
        fileStatus: ''//档案状态
      },
      updatefrom1:{
        arm_Circumference:"",
        information_id: "",
        height: "",
        weight: "",
        diastolic_pressure: "",
        systolic_pressure: "",
        breathe: "",
        temperature: "",
        the_waist: "",
        Arm_circumference:"",
        t_BML: "",
        Blood_oxygen_saturation: "",
        temperatureId:""
      },
      updatefrom2:{
        allergy_History:"",
        chronic_Disease:"",
        historyId:"",
        medical_History:"",
        past_History:"",
        family_History:""
      },
      addForm: {
        fileNumber: '',// 档案编号
        name: '',// 姓名
        sex: '', //性别
        idCard: '',// 身份证号码
        phoneNumber: '',// 手机号码
        regTime: '', //注册时间（日期类型）
        password: '',// 密码
        email: '', //电子邮箱
        birthday: '',// 生日（日期类型）
        remark: '',// 备注
        marriageStatus: '',// 婚姻状况
        nation: '',// 民族
        career: '',//职业
        nativePlace: '',// 籍贯
        educationLevel: '',//" 教育程度
        username:'',//管理师
        age:"",//年龄
        roleId: '',//角色ID
        fileStatus: ''//档案状态
      }
      ,
      opensave: false,
      UpdateData:
        false,
      form:
        '',
      dialogFormVisible:
        false,
      currentPage:
        1,
      input:
        '',
      pageSize:
        5,
      totalNum:
        10,
      currentPages:
        1,
      inputs:
        '',
      pageSizes:
        5,
      totalNums:
        10,
      tableData:
        [],
      tableData1:
        [],
      loading:
        false
    }
  }
}
</script>
<style>
.custom-input {
  width: 200px;
  height: 40px;
}

</style>
